package org.ezplatform.office.meeting.info.dao;

import java.util.List;

import org.ezplatform.core.dao.jpa.JpaBaseDao;
import org.ezplatform.office.meeting.info.entity.SignedAddress;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface SignedAddressDao extends JpaBaseDao<SignedAddress, String> {

	@Query(value = "from SignedAddress s where s.applyRecordId = ?1 ")
    List<SignedAddress> findByApplyRecordId(String applyRecordId);
	
    @Query(value = "from SignedAddress s where s.fkid = ?1 ")
    List<SignedAddress> findByFkidId(String fkid);
	
	@Modifying
    @Query(value = "delete from SignedAddress s where s.applyRecordId in (?1)")
    int delByRecordId(String... recordIds);
}